package com.source.baseData.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.source.baseData.vo.EntrustDefaultInfoVO;
import com.source.baseData.vo.EntrustVO;
import com.source.baseData.entity.Entrust;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Feng
 * @since 2021-02-12
 */
public interface EntrustService extends IService<Entrust> {

    List<EntrustVO> getList();

    Page<EntrustVO> getPage(int current, int size);

    boolean cancel(String id);

    String agree(String id);

    boolean refuse(String id);

    EntrustVO getByEntrustId(String id);

    List<EntrustVO> getListByToMarketIdAndStatus(String toMarketId, int status);

    Page<EntrustVO> getPageByToMarketIdAndStatus(String toMarketId, int status, int current, int size);

    List<EntrustVO> getListByUserIdAndStatus(String userId, int status);

    Page<EntrustVO> getPageByUserIdAndStatus(String userId, int status, int current, int size);

    List<EntrustVO> getListByToMarketId(String toMarketId);

    Page<EntrustVO> getPageByToMarketId(String toMarketId, int current, int size);

    List<EntrustVO> getListByUserId(String userId);

    Page<EntrustVO> getPageByUserId(String userId, int current, int size);

    List<EntrustVO> like(String str);

    Page<EntrustVO> like(String str, int current, int size);

    boolean recording(String entrustId, String barcodeMachineNumber);

    boolean finish(String id);

    EntrustDefaultInfoVO defaultInfo(String userId);

    IPage<Entrust> findGoMarketTodayByUser(String userId, Integer current, Integer size);

    IPage<Entrust> findGoMarketTodayByUser(String userId, Integer status, Integer current, Integer size);

    IPage<Entrust> findGoMarketTodayByToMarket(String toMarketId, Integer current, Integer size);

    IPage<Entrust> findGoMarketTodayByToMarket(String toMarketId, Integer status, Integer current, Integer size);

    IPage<Entrust> findGoMarketTodayByStalls(String stallsId, Integer current, Integer size);

    IPage<Entrust> findGoMarketTodayByStalls(String stallsId, Integer status, Integer current, Integer size);

    String reLabel(String entrustId, String barcodeMachineNumber);

    IPage<Entrust> historyByUser(String userId,  Integer current, Integer size, Date from, Date to);

    IPage<Entrust> historyByUserAndStatus(String userId, Integer status, Integer current, Integer size, Date from, Date to);

    IPage<Entrust> historyByToMarket(String toMarketId, Integer current, Integer size, Date from, Date to);

    IPage<Entrust> historyByToMarketAndState(String toMarketId, Integer status, Integer current, Integer size, Date from, Date to);

    IPage<Entrust> historyByStalls(String stallsId, Integer current, Integer size, Date from, Date to);

    IPage<Entrust> historyByStallsAndState(String stallsId, Integer status, Integer current, Integer size, Date from, Date to);

    String viewQRCode(String entrustId, String barcodeMachineNumber);
}
